package com.jzo2o.customer.controller.worker;

import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.service.IWorkerCertificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Api("服务端认证接口")
@RestController("workCertificationController")
@RequestMapping("/worker")
public class WorkCertificationController {

    @Autowired
    private IWorkerCertificationService workerCertificationService;
    @PostMapping("/worker-certification-audit")
    @ApiOperation("提交认证申请")
    public void addCertificationAudit(@RequestBody WorkerCertificationAuditAddReqDTO wcaDTO){
        workerCertificationService.addCertificationAudit(wcaDTO);
    }

    @GetMapping("/worker-certification-audit/rejectReason")
    @ApiOperation("查询最新的驳回原因")
    public String getRejectReason(){
        return workerCertificationService.getRejectReason();
    }
}
